Package it. czerwinski. kotlin. util
Contains utility types based on Scala.
Types
Functions
Link copied to clipboard
fun <L, R> RightProjection<L, R?>.filterNotNullToOption(): Option<Either<L, R>>
Content copied to clipboard
fun <L, R> LeftProjection<L?, R>.filterNotNullToOption(): Option<Either<L, R>>
Content copied to clipboard
Link copied to clipboard
inline fun <L, R> Either<L, R>.filterOrElse(predicate: (R) -> Boolean, zero: () -> L): Either<L, R>
Content copied to clipboard
inline fun <L, R> RightProjection<L, R>.filterOrElse(predicate: (R) -> Boolean, zero: () -> L): Either<L, R>
Content copied to clipboard
Returns the same Right if the predicate is satisfied for the value, Left(zero) if the predicate is not satisfied for the value, or the same Left if this is Left.
Link copied to clipboard
inline fun <L, R, T> Either<L, R>.flatMap(transform: (R) -> Either<L, T>): Either<L, T>
Content copied to clipboard
inline fun <L, R, T> RightProjection<L, R>.flatMap(transform: (R) -> Either<L, T>): Either<L, T>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard